{extend name="public/layer/main" /}
{block name="css"}{/block}
{block name="style"}{/block}
{block name="js"}
<script src="__PUBLIC__/admin/assets/js/echarts.js"></script>
{/block}
{block name="script"}
<script type="text/javascript">
    $(function () {
        //收益图表
        showShouYi();
        //实际收益图表
        showRealShouYi();
    });

    /**
     * 收益图表
     */
    function showShouYi() {
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('container'));

        // 指定图表的配置项和数据
        var option = {
            legend: {},
            tooltip: {},
            dataset: {
                dimensions: ['product', '微链积分', '营业额', '银行卡收益'],
                source: [
                    {product: '月收益', '微链积分': 0, '营业额': 0, '银行卡收益': 0},
                    {product: '年收益', '微链积分': 0, '营业额': 0, '银行卡收益': 0},
                    {product: '总收益', '微链积分': 0, '营业额': 0, '银行卡收益': 0}
    ]
    },
        xAxis: {type: 'category'},
        yAxis: {},
        // Declare several bar series, each will be mapped
        // to a column of dataset.source by default.
        series: [
            {type: 'bar'},
            {type: 'bar'},
            {type: 'bar'}
        ]
    };

        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
    }

    /**
     * 实收收益图表
     */
    function showRealShouYi() {
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('container2'));

        // 指定图表的配置项和数据
        var option = {
            legend: {},
            tooltip: {},
            dataset: {
                dimensions: ['product', '微链积分', '营业额', '银行卡收益'],
                source: [
                    {product: '月收益', '微链积分': 0, '营业额': 0, '银行卡收益': 0},
                    {product: '年收益', '微链积分': 0, '营业额': 0, '银行卡收益': 0},
                    {product: '总收益', '微链积分': 0, '营业额': 0, '银行卡收益': 0},
                ]
            },
        xAxis: {type: 'category'},
        yAxis: {},
        // Declare several bar series, each will be mapped
        // to a column of dataset.source by default.
        series: [
            {type: 'bar'},
            {type: 'bar'},
            {type: 'bar'}
        ]
    };

        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
    }
</script>
{/block}
{block name="module"}{$globals.module}{/block}
{block name="controller"}{$globals.controller}{/block}
{block name="action"}{$globals.action}{/block}
{block name="desc"}{$globals.desc}{/block}
{block name="content"}
<div class="row">
    <div class="col-sm-3">
        <div class="small-box bg-aqua">
            <div class="inner">
                <h3>0</h3>
                <p>粉丝</p>
            </div>
            <div class="icon">
                <i class="ion ion ion-person-add"></i>
            </div>
            <a href="" class="small-box-footer"> <i class="fa fa-arrow-circle-right"></i></a>
        </div>
    </div>
    <div class="col-sm-3">
        <div class="small-box bg-green">
            <div class="inner">
                <h3>0</h3>
                <p>日交易订单</p>
            </div>
            <div class="icon">
                <i class="ion ion-pie-graph"></i>
            </div>
            <a href="" class="small-box-footer">点击查看 <i class="fa fa-arrow-circle-right"></i></a>
        </div>
    </div>
    <div class="col-sm-3">
        <div class="small-box bg-yellow">
            <div class="inner">
                <h3>0</h3>
                <p>现金日交易额</p>
            </div>
            <div class="icon">
                <i class="ion ion-stats-bars"></i>
            </div>
            <a href="" class="small-box-footer">点击查看 <i class="fa fa-arrow-circle-right"></i></a>
        </div>
    </div>
    <div class="col-sm-3">
        <div class="small-box bg-red">
            <div class="inner">
                <h3>0</h3>
                <p>积分日交易额</p>
            </div>
            <div class="icon">
                <i class="ion ion-pie-graph"></i>
            </div>
            <a href="" class="small-box-footer">点击查看 <i class="fa fa-arrow-circle-right"></i></a>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-sm-6">
        <div class="box box-success">
            <div class="box-header with-border">
                <h3 class="box-title">收益统计概述</h3>
            </div>
            <div class="box-body">
                <div id="container" style="height:320px;"></div>
            </div>
        </div>
    </div>
    <div class="col-sm-6">
        <div class="box box-success">
            <div class="box-header with-border">
                <h3 class="box-title">（实际）收益统计概述</h3>
            </div>
            <div class="box-body">
                <div id="container2" style="height:320px;"></div>
            </div>
        </div>
    </div>
</div>
{/block}